package com.example.wishstar.model;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "memory")
public class Memory {
    @PrimaryKey()
    @ColumnInfo(name = "memoryId", typeAffinity = ColumnInfo.INTEGER)
    public int memoryId;

    @ColumnInfo(name = "userId", typeAffinity = ColumnInfo.INTEGER)
    public int userId;

    @ColumnInfo(name = "memoryTitle", typeAffinity = ColumnInfo.TEXT)
    public String memoryTitle;

    @ColumnInfo(name = "memoryDate", typeAffinity = ColumnInfo.TEXT)
    public String memoryDate;

    @ColumnInfo(name = "isRepeat", typeAffinity = ColumnInfo.INTEGER)
    public int isRepeat;

    @ColumnInfo(name = "type", typeAffinity = ColumnInfo.INTEGER)
    public int type;

    @ColumnInfo(name = "dayNum", typeAffinity = ColumnInfo.INTEGER)
    public int dayNum;

    @ColumnInfo(name = "dayNumString", typeAffinity = ColumnInfo.TEXT)
    public String dayNumString;

    public Memory(int memoryId, int userId, String memoryTitle, String memoryDate, int isRepeat, int type, int dayNum, String dayNumString) {
        this.memoryId = memoryId;
        this.userId = userId;
        this.memoryTitle = memoryTitle;
        this.memoryDate = memoryDate;
        this.isRepeat = isRepeat;
        this.type = type;
        this.dayNum = dayNum;
        this.dayNumString = dayNumString;
    }

    @Override
    public String toString() {
        return "Memory{" +
                "memoryId=" + memoryId +
                ", userId=" + userId +
                ", memoryTitle='" + memoryTitle + '\'' +
                ", memoryDate='" + memoryDate + '\'' +
                ", isRepeat=" + isRepeat +
                ", type=" + type +
                ", dayNum=" + dayNum +
                ", dayNumString='" + dayNumString + '\'' +
                '}';
    }
}
